package net.trustie.pipeline;

import core.PageModelPipeline4Update;
import net.trustie.dao.OpenHubProject4Update_Dao;
import net.trustie.model.openhub_Model;
import us.codecraft.webmagic.Task;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import net.trustie.dao.OpenHubProject_Dao;
import net.trustie.model.openhub_Model;
import core.PageModelPipeline;

/**
 * Created by LouAnt on 2017/2/14 0014
 * Description：
 */
@Component("openhub_pipeline_4update")
public class OpenHubProject_pipeline_4update implements PageModelPipeline4Update<openhub_Model> {

    @Resource
    private OpenHubProject4Update_Dao openHubProject4Update_dao;
    /**
     * 更新Homepage专用
     * @param openhub_model
     * @param task
     */
    @Override
    public void processUpdate(openhub_Model openhub_model, String url, Task task){
        openHubProject4Update_dao.updateHomepage(openhub_model.getHomepage(),url);
    }
}
